package com.xiaoshuidi.cloud.module.rooms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoshuidi.cloud.framework.common.pojo.PageResult;
import com.xiaoshuidi.cloud.module.rooms.controller.admin.roomEquipmentrepair.vo.RoomEquipmentRepairResp;
import com.xiaoshuidi.cloud.module.rooms.controller.admin.roomEquipmentrepair.vo.RoomEquipmentRepairVO;
import com.xiaoshuidi.cloud.module.rooms.pojo.RoomEquipmentRepair;

import java.util.List;

public interface RoomEquipmentRepairService extends IService<RoomEquipmentRepair> {
    /**
     * 新增资产维修记录
     *
     * @param vo
     * @return
     */
    Boolean create(RoomEquipmentRepairVO vo);

    /**
     * 根据资产id查询维修记录
     *
     * @param equipmentId
     * @return
     */
    List<RoomEquipmentRepairResp> listByEquipmentId(Long equipmentId);

    /**
     * 根据id查询维修详情
     *
     * @param id
     * @return
     */
    RoomEquipmentRepairVO getById(Long id);

    /**
     * 删除维修记录
     *
     * @param id
     * @return
     */
    Boolean deleteById(Long id);

    /**
     * 根据id改变状态为已完成
     *
     * @param id
     * @return
     */
    Boolean updateStateById(Long id);

    /**
     * 根据资产ID查询分页维修记录
     *
     * @param equipmentId
     * @return {@link PageResult}<{@link RoomEquipmentRepairResp}>
     */
    PageResult<RoomEquipmentRepairResp> page(Long equipmentId, int pageNum, int pageSize);
}
